# -*- coding:utf-8 -*-
# @FileName :screenshot_actions.py
# @Created  :2025/1/12
# @Author   :天空之城
import time

from PIL import ImageGrab


def take_screenshot(file_path):
    """
    截取屏幕截图并保存到指定路径。

    :param file_path: 保存截图的文件路径，包括文件名和扩展名，例如 'screenshot.png'
    """
    time.sleep(2)
    screenshot = ImageGrab.grab()
    screenshot.save(file_path)
